package easy;

public class a367_有效的完全平方数 {
    public boolean isPerfectSquare(int num) {
        int j = 1;
        while (num > 0) {
            num = num - j;
            j += 2;
        }
        return num == 0;
    }
}